import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home/Home.vue'
import User from '@/views/User/User.vue'
import EditInfo from '@/views/EditInfo/EditInfo.vue'


// 把VueRouter 安装为Vue的插件
Vue.use(VueRouter)

// 路由规则的数组
const routes = [
  { path: '/', component: Home },
  { path: '/user', component: User },
  { path: '/user/editinfo', component: EditInfo, name: 'user-edit' }
]
// 创建路由的实例对象
const router = new VueRouter({
  routes
})

export default router
